package com.itheima.dao;

import com.itheima.entity.User;
import com.itheima.entity.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    //增
    int insertUser(User user);
    //删
    int deleteUserById(@Param("id") Integer id);
    //改
    int updateUserById(User user);
    //查
    List<User> selectUserFindAll();

    //联级查询
    //user和userInfo表join查id
    User selectUserById(Integer id);
    //user和order和userInfo表join查id
    User selectOrderUserById (Integer id);


    //数据库join查询一对一
    User userAndUserInfo(Integer id);


}
